package com.rx.mgt.service;

import com.rx.mgt.dao.UserGroupDepartMentDao;
import com.rx.mgt.domain.UserGroupDepartMent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by zxj on 2017/4/18.
 */
@Service
public class UserGroupDepartMentService {
    @Autowired
    UserGroupDepartMentDao dao;

    public void delete(String id) {
        dao.delete(dao.get(id));
    }

    public List<UserGroupDepartMent> queryAllDepartmentsByGroupId(String pId) {
        return dao.queryAllDepartmentsByGroupId(pId);
    }
}
